from django.db import models


# Create your models here.
class car_sales(models.Model):
    name = models.CharField(max_length=100,verbose_name='车名')
    price = models.CharField(max_length=100,verbose_name='价格')
    numbers = models.IntegerField(verbose_name='销量')
    images = models.ImageField(upload_to='',verbose_name='图片')

    def __str__(self):
        return self.name

    class Meta:
        #managed = False #False不会在生成表
        verbose_name_plural = '热销汽车'
        managed = False


class car_popularity(models.Model):
    name = models.CharField(max_length=100,verbose_name='车名')
    price = models.CharField(max_length=100,verbose_name='价格')
    index = models.CharField(max_length=100,verbose_name='人气值')
    images = models.ImageField(upload_to='',verbose_name='图片')

    def __str__(self):
        return self.name

    class Meta:
        #managed = False #False不会在生成表
        verbose_name_plural='人气汽车'
        managed = False